/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package View;

import agh.rozproszony.model.Invitation;
import agh.rozproszony.model.Reservation;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 *
 * @author Marcin_PC
 */
public class InvitationRow {

    String inviter, hour, title;
    String date;
    Boolean accepted = false;
    int reservationId;

    InvitationRow(Invitation invitation, Reservation reservation, String owner) {
        this.inviter = owner;
        //DateFormat df = new SimpleDateFormat("dd/MM/yyyy");
        //Date d = new Date(reservation.getYear(), reservation.getMonth()-1, reservation.getDay());
       // this.date = df.format(d);
       
        date = reservation.getDay()+"/"+reservation.getMonth()+"/"+reservation.getYear();
        
        String from = Integer.toString(reservation.getFromHour());
        String to = Integer.toString(reservation.getToHour());
        this.hour = from + " - " + to;
        this.title = invitation.getTitle();
        this.reservationId = reservation.getId();
    }

    InvitationRow(String inviter2, String hour2, String title2, String date2, Boolean accepted2, int reservationId2) {
        this.inviter = inviter2;
        this.date = date2;
        this.hour = hour2;
        this.title = title2;
        this.reservationId = reservationId2;
        this.accepted = accepted2;
    }

    public int getReservationId() {
        return reservationId;
    }

    public void setReservationId(int reservationId) {
        this.reservationId = reservationId;
    }

    public String getInviter() {
        return inviter;
    }

    public void setInviter(String inviter) {
        this.inviter = inviter;
    }

    public String getHour() {
        return hour;
    }

    public void setHour(String hour) {
        this.hour = hour;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public Boolean getAccepted() {
        return accepted;
    }

    public void setAccepted(Boolean accepted) {
        this.accepted = accepted;
    }
}
